<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        var obj = {
            name:"老王",
            age:18
        }

        function fn(num,name){
            console.log(this);

            this.age+=num;

            this.name = name;

        }

        // 参数1：要把函数中的this改成谁

        // fn.call(obj,2,'小李')

        // fn.apply(obj,[17,'小赵'])

        fn.bind(obj)(5,'老高')

        console.log(obj);


    </script>

</body>
</html>